package mapReduce.demo05_shuffle.demo03_expressNumSort;

import mapReduce.util.JobSubmit;
import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.io.NullWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Mapper;

import java.io.IOException;

public class ExpressNumSortApp {

    public static class ENSMapper extends Mapper<LongWritable, Text,Text, NullWritable>{

        Text outKey = new Text();

        @Override
        protected void map(LongWritable key, Text value, Mapper<LongWritable, Text, Text, NullWritable>.Context context) throws IOException, InterruptedException {

            String line = value.toString();
            outKey.set(line);
            context.write(outKey,NullWritable.get());

        }
    }

    public static void main(String[] args) {
        JobSubmit.submitBaseJob(ExpressNumSortApp.class,args,ExpressNumSortComparator.class);
    }

}
